let { Schema, model } = require("mongoose");

let {TestPaperModel} = require("../models/testPaperModel")


let stuSchema = new Schema({
    phone: String,
    name: String,
    gender: String,
    avatar: String,
  })
  let stuModel = model("stuModel", stuSchema, "students")
  
  



let ErrSchema = new Schema({
    studentId: {   // 所属学员 _id
        type: Schema.Types.ObjectId,
        ref: stuModel
    },
    exerciseId: {
        type: Schema.Types.ObjectId,
        ref: TestPaperModel
    },
    errorAnswer: Number, // 错误答案
})
let ErrModel = model("ErrModel", ErrSchema, "errors")

module.exports = {ErrModel}